module.exports = Behavior({
    methods: {
        isLogin() {
            return !!wx.getStorageSync('token')
        }
    },
    created() {
        if (!this.isLogin()) {
            wx.redirectTo({
                url: '/pages/my/login/login'
            })
        }
    }
})
